//
//  AppDelegate.m
//  GanLuApp
//
//  Created by 暗流澎涌 on 2024/4/1.
//

#import "AppDelegate.h"
#import "FLYDPage.h"
#import "GanLuHomeVCViewController.h"
#import <IQKeyboardManager/IQKeyboardManager.h>


@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    IQKeyboardManager.sharedManager.enable = YES;
    [IQKeyboardManager.sharedManager goNext];
    [self isShowNewSpecialityView];
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)toGuidePage {
    self.window.rootViewController = [[FLYDPage alloc] init];
}

- (void)isShowNewSpecialityView {
    
    if (![[NSUserDefaults standardUserDefaults] boolForKey:@"glopenGuide"]) {
        [self toGuidePage];
    } else {
        [self toMain];
    }
}


- (void)toMain {
    GanLuHomeVCViewController *GLVC = [[GanLuHomeVCViewController alloc] init];
    UINavigationController *GLNav = [[UINavigationController alloc] initWithRootViewController:GLVC];
    self.window.rootViewController = GLNav;
}

-(UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window{
    
return UIInterfaceOrientationMaskPortrait;//默认全局不支持横屏

}
@end
